package it.globalgamejam.scar 
{
	import it.globalgamejam.scar.menu.MenuWorld;
	import net.flashpunk.Engine;
	import net.flashpunk.FP;
	import net.flashpunk.Sfx;
	/**
	 * ...
	 * @author N1xx1
	 */
	public class Main extends Engine
	{
		public static var instance:Main;
		
		public var backgroundMusic1:Sfx = new Sfx(Assets.BACKGROUND_MUSIC_1);
		//public var backgroundMusic2:Sfx = new Sfx(Assets.BACKGROUND_MUSIC_2);
		public var isPlaying:Boolean = false;
		
		public function Main() 
		{
			super(800, 600, 60, false);
			FP.world = new MenuWorld();
			
			FP.screen.color = 0x111111;
			
			instance = this;
		}
		
		public function enterMenu():void {
			//backgroundMusic2.loop();
			backgroundMusic1.stop();
			isPlaying = false;
		}
		
		public function startGame():void {
			if (!isPlaying) {
				//backgroundMusic2.stop();
				backgroundMusic1.loop();
				isPlaying = true;
			}
		}
		
	}

}